﻿<UserControl x:Class="Workbench.Presentation.ProjectView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:view="clr-namespace:Workbench.Presentation">
    <UserControl.Resources>
        <view:EnumToBoolConverter x:Key="enumConverter" />
        <view:InverseBooleanConverter x:Key="InverseBooleanConverter" />
    </UserControl.Resources>
    <Grid Grid.Row="1">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" MinWidth="200"></ColumnDefinition>
            <ColumnDefinition Width="5"></ColumnDefinition>
            <ColumnDefinition Width="500" MinWidth="500"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <!-- Column 0 -->
        <view:ProjectTreeView DataContext="{Binding ProjectTreeViewModel}"
                              AddExistingDirectoryCommand="{Binding AddExistingDirectoryCommand}" 
                              AddExistingFileCommand="{Binding AddExistingFileCommand}" 
                              Grid.Column="0" />
        <!-- Column 1 -->
        <GridSplitter
            Grid.Row="0"
            Grid.Column="1"
            ResizeDirection="Columns"
            Width="5"
            Height="Auto"
            HorizontalAlignment="Stretch"
            VerticalAlignment="Stretch"
            Margin="0"
            Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" />
        <!-- Column 2 -->
        <Border Grid.Column="2" BorderBrush="Black" BorderThickness="0.7 0 0 0">
            <DockPanel Margin="20 5">
                <DockPanel.Resources>
                    <Style TargetType="{x:Type TextBlock}">
                        <Setter Property="FontSize" Value="13"></Setter>
                        <Setter Property="Margin" Value="0 3 0 0"></Setter>
                    </Style>
                </DockPanel.Resources>
                <Border DockPanel.Dock="Top" BorderBrush="Black" BorderThickness="0 0 0 0.25">
                    <TextBlock FontSize="18" Margin="0 10 0 5" Padding="0">Text Segments</TextBlock>
                </Border>
                <Grid DockPanel.Dock="Top" Width="230" HorizontalAlignment="Left">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="150"></ColumnDefinition>
                        <ColumnDefinition Width="80"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"></RowDefinition>
                        <RowDefinition Height="Auto"></RowDefinition>
                        <RowDefinition Height="Auto"></RowDefinition>
                        <RowDefinition Height="Auto"></RowDefinition>
                    </Grid.RowDefinitions>
                    <TextBlock TextTrimming="CharacterEllipsis" Text="Paragraphs:" Grid.Column="0" Grid.Row="0"></TextBlock>
                    <TextBlock TextTrimming="CharacterEllipsis" Text="Sentences:" Grid.Column="0" Grid.Row="1"></TextBlock>
                    <TextBlock TextTrimming="CharacterEllipsis" Text="Text in running words:" Grid.Column="0" Grid.Row="2"></TextBlock>
                    <TextBlock TextTrimming="CharacterEllipsis" Text="Different forms:" Grid.Column="0" Grid.Row="3"></TextBlock>
                    <TextBlock Text="{Binding Paragraphs}" Grid.Column="1" Grid.Row="0"></TextBlock>
                    <TextBlock Text="{Binding Sentences}" Grid.Column="1" Grid.Row="1"></TextBlock>
                    <TextBlock Text="{Binding TextLengthInRunningWords}" Grid.Column="1" Grid.Row="2"></TextBlock>
                    <TextBlock Text="{Binding DifferentForms}" Grid.Column="1" Grid.Row="3"></TextBlock>
                </Grid>
                <Border DockPanel.Dock="Top" BorderBrush="Black" BorderThickness="0 0 0 0.15">
                    <TextBlock FontSize="18" Margin="0 10 0 5" Padding="0">Text Statistics</TextBlock>
                </Border>

                <Grid DockPanel.Dock="Top">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="380"></ColumnDefinition>
                        <ColumnDefinition Width="80"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"></RowDefinition>
                        <RowDefinition Height="Auto"></RowDefinition>
                        <RowDefinition Height="Auto"></RowDefinition>
                        <RowDefinition Height="Auto"></RowDefinition>
                        <RowDefinition Height="Auto"></RowDefinition>
                    </Grid.RowDefinitions>
                    <TextBlock TextTrimming="CharacterEllipsis" Text="Avg. length of paragraph in sentences:" Grid.Column="0" Grid.Row="0"></TextBlock>
                    <TextBlock TextTrimming="CharacterEllipsis" Text="Avg. length of paragraph in words:" Grid.Column="0" Grid.Row="1"></TextBlock>
                    <TextBlock TextTrimming="CharacterEllipsis" Text="Avg. length of sentence in words:" Grid.Column="0" Grid.Row="2"></TextBlock>
                    <TextBlock TextTrimming="CharacterEllipsis" Text="Max. number of words in sentence:" Grid.Column="0" Grid.Row="3"></TextBlock>
                    <TextBlock TextTrimming="CharacterEllipsis" Text="Max. number of sentences in paragraph:" Grid.Column="0" Grid.Row="4"></TextBlock>
                    <TextBlock Text="{Binding AverageLengthOfParagraphInSentences}" Grid.Column="1" Grid.Row="0"></TextBlock>
                    <TextBlock Text="{Binding AverageLengthOfParagraphInWords}" Grid.Column="1" Grid.Row="1"></TextBlock>
                    <TextBlock Text="{Binding AverageLengthOfSentenceInWords}" Grid.Column="1" Grid.Row="2"></TextBlock>
                    <TextBlock Text="{Binding MaximumNumberOfWordsInSentence}" Grid.Column="1" Grid.Row="3"></TextBlock>
                    <TextBlock Text="{Binding MaximumNumberOfSentencesInParagraph}" Grid.Column="1" Grid.Row="4"></TextBlock>
                </Grid>
                <view:POSTypesTreeView DockPanel.Dock="Top" DataContext="{Binding POSTypesTreeViewModel}"></view:POSTypesTreeView>
            </DockPanel>
        </Border>
    </Grid>
</UserControl>
